package com.kkwrite.regimen.common.entity.dto.user;

import java.io.Serializable;

/**
 * Created by lisha on 2018/7/16 14:39.
 *
 * @author lisha
 */
public class RegUserInDTO implements Serializable {
    private static final long serialVersionUID = -350441775658484126L;

    private Integer userId;
    private String nickName;
    private String avatarUrl;
    private String gender;
    private String language;
    private String country;
    private String province;
    private String city;
    private String phoneNum;
    private String inviteQrcodePath;

    public boolean isEmpty() {
        return isBlank(nickName) && isBlank(avatarUrl)
                && isBlank(gender) && isBlank(language)
                && isBlank(country) && isBlank(province)
                && isBlank(city) && isBlank(phoneNum);
    }

    private boolean isBlank(String str) {
        return str == null || str.length() == 0 || str.trim().length() == 0;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getInviteQrcodePath() {
        return inviteQrcodePath;
    }

    public void setInviteQrcodePath(String inviteQrcodePath) {
        this.inviteQrcodePath = inviteQrcodePath;
    }

    @Override
    public String toString() {
        return "RegUserInDTO{" +
                "userId=" + userId +
                ", nickName='" + nickName + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", gender='" + gender + '\'' +
                ", language='" + language + '\'' +
                ", country='" + country + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", phoneNum='" + phoneNum + '\'' +
                ", inviteQrcodePath='" + inviteQrcodePath + '\'' +
                '}' + "; " + super.toString();
    }
}
